package com.sugar.real.estate.module.business.service.readyhouse;

import com.sugar.real.estate.framework.common.pojo.PageResult;
import com.sugar.real.estate.module.business.controller.admin.readyhouse.vo.ReadyHousePageReqVO;
import com.sugar.real.estate.module.business.controller.admin.readyhouse.vo.ReadyHouseRespVO;
import com.sugar.real.estate.module.business.controller.admin.readyhouse.vo.ReadyHouseSaveReqVO;
import com.sugar.real.estate.module.business.controller.app.readyhouse.vo.AppReadyHouseDetailRespVO;
import com.sugar.real.estate.module.business.controller.app.readyhouse.vo.AppReadyHousePageReqVO;
import com.sugar.real.estate.module.business.controller.app.readyhouse.vo.AppReadyHouseSimpleRespVO;
import com.sugar.real.estate.module.infra.controller.admin.file.vo.file.FileUploadReqVO;

import javax.validation.Valid;
import java.util.List;

/**
 * 现房 Service 接口
 *
 * @author Ysugar
 */
public interface ReadyHouseService {

    /**
     * 创建现房
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createReadyHouse(@Valid ReadyHouseSaveReqVO createReqVO);

    /**
     * 更新现房
     *
     * @param updateReqVO 更新信息
     */
    void updateReadyHouse(@Valid ReadyHouseSaveReqVO updateReqVO);

    /**
     * 删除现房
     *
     * @param id 编号
     */
    void deleteReadyHouse(Long id);

    /**
    * 批量删除现房
    *
    * @param ids 编号
    */
    void deleteReadyHouseListByIds(List<Long> ids);

    /**
     * 获得现房
     *
     * @param id 编号
     * @return 现房
     */
    ReadyHouseRespVO getReadyHouse(Long id);

    /**
     * 获得现房分页
     *
     * @param pageReqVO 分页查询
     * @return 现房分页
     */
    PageResult<ReadyHouseRespVO> getReadyHousePage(ReadyHousePageReqVO pageReqVO);

    PageResult<AppReadyHouseSimpleRespVO> appGetReadyHousePage(@Valid AppReadyHousePageReqVO reqVO);

    List<AppReadyHouseSimpleRespVO> getReadyHouseListByMap(AppReadyHousePageReqVO reqVO);

    AppReadyHouseDetailRespVO appGetReadyHouse(Long id, Long userId);

    void importExcel(FileUploadReqVO uploadReqVO);

    void updateReadyHouseStatus(Long id, Boolean isShow);
}